﻿<UserControl x:Class="cpe.cpein.UI.Controls.UCUser"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="660" d:DesignWidth="930" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <TextBlock Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Text="" Name="lblTitleUser" FontSize="18"/>
        <Button Name="btEdit" Content="Modifier" Grid.Column="9" Grid.Row="0" Click="btEdit_Click"/>
        <Button Name="btCancel" Content="Annuler" Grid.Column="10" Grid.Row="0" Click="btCancel_Click"/>
        <Button Name="btSave" Content="Enregistrer" Grid.Column="9" Grid.Row="0" Click="btSave_Click"/>
        <Button Name="btActualize" Content="Actualiser" Grid.Column="10" Grid.Row="0" Click="btActualize_Click"/>
        <Rectangle Grid.ColumnSpan="10" Grid.Column="1" Margin="0,10,14,5" Grid.Row="1" Grid.RowSpan="20" Stroke="Black" StrokeThickness="1" VerticalAlignment="Stretch" />
        
        <TextBlock Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="1" Text="Name" x:Name="lblUserName" VerticalAlignment="Center" Margin="20,8,0,8"/>
        <TextBox Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="2" Text="" x:Name="txtUserName" VerticalAlignment="Center" Margin="0,5"/>

        <TextBlock Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="1" Text="First Name" x:Name="lblUserFirstName" VerticalAlignment="Center" Margin="20,8,0,7"/>
        <TextBox Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Text="" x:Name="txtUserFirstName" VerticalAlignment="Center" Margin="0,5,0,4"/>

        <TextBlock Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="1" Text="Email" x:Name="lblUserMail" VerticalAlignment="Center" Margin="20,8,0,8"/>
        <TextBox Grid.Column="2" Grid.Row="4" Grid.ColumnSpan="2" Text="" x:Name="txtUserMail" VerticalAlignment="Center" Margin="0,5"/>

        <TextBlock Grid.Column="6" Grid.Row="6" Grid.ColumnSpan="2" Text="Relations" Name="lblRelations" FontSize="18" Margin="20,0,0,0"/>
        <Rectangle Grid.ColumnSpan="5" Grid.Column="6" Margin="20,0,40,5" Grid.Row="7" Grid.RowSpan="13" Stroke="Black" StrokeThickness="1" VerticalAlignment="Stretch" />
        <DataGrid HeadersVisibility="None"  MouseDoubleClick="RelationGrid_DoubleClick" SelectedValuePath="Id" RowHeight="30" IsReadOnly="True" AutoGenerateColumns="False" Name="RelationGrid" Background="White" Grid.Column="6" Grid.ColumnSpan="5" Grid.RowSpan="13" Margin="30,10,50,15" Grid.Row="7" VerticalAlignment="Stretch" BorderThickness="0">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Id}" FontSize="16" Visibility="Hidden"/>
                <DataGridTextColumn Binding="{Binding Name}" FontSize="16" MinWidth="200" />
                <DataGridTextColumn Binding="{Binding Lastname}" FontSize="16" MinWidth="200" />
            </DataGrid.Columns>
        </DataGrid>

        <TextBlock Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="2" Text="Skills" Name="lblSkills" FontSize="18" Margin="20,0,0,0"/>
        <Rectangle Grid.ColumnSpan="5" Grid.Column="1" Margin="20,0,40,5" Grid.Row="7" Grid.RowSpan="13" Stroke="Black" StrokeThickness="1" VerticalAlignment="Stretch" />
        <DataGrid HeadersVisibility="None" MouseDoubleClick="SkillGrid_DoubleClick" SelectedValuePath="Id" RowHeight="30" IsReadOnly="True" AutoGenerateColumns="False" Name="SkillGrid" Background="White" Grid.Column="1" Grid.ColumnSpan="5" Grid.RowSpan="13" Margin="30,10,50,15" Grid.Row="7" VerticalAlignment="Stretch" BorderThickness="0">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Id}" FontSize="16" Visibility="Hidden"/>
                <DataGridTextColumn Binding="{Binding Label}" FontSize="16" MinWidth="200" />
            </DataGrid.Columns>
        </DataGrid>
        <ComboBox Margin="0,0,0,0" VerticalAlignment="Stretch" Name="cmbRelation" DisplayMemberPath="Value" SelectedValuePath="Id" Grid.ColumnSpan="3" Grid.Column="5" HorizontalAlignment="Left" MinWidth="240" Height="31" SelectionChanged="cmbRelation_SelectionChanged"/>

    </Grid>
</UserControl>